package tasktest 
{
	import flash.display.Sprite;
	import flash.utils.getTimer;
	import iscript.gameFramework.GameLite.events.TaskEvent;
	import iscript.gameFramework.GameLite.Game;
	import iscript.gameFramework.GameLite.thread.task.Task;
	
	
	public class TaskTest extends Sprite
	{
		private var startTime:int
		public function TaskTest() 
		{
			
			var game:Game = new Game(stage);
			
			
			
			startTime=getTimer()
			trace(startTime)
			var  task:Task = new Task();
			task.concurrent = 2;
			for (var i:int = 0; i < 10; i++) 
			{
				task.addAction(new TaskA(i));
			}
			task.addEventListener(TaskEvent.COMPLETE, complete);
			task.start(1000);
		}
		
		private function complete(e:TaskEvent):void 
		{
			
			//trace(getTimer() - startTime);
			//trace((getTimer() - startTime)/1000);
		}
		
	}

}